<!DOCTYPE html> 
<html>
  <head>
    <title>JSIL Raytracer Demo</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
  </head>
  <body onload="onLoad()">
    <script type="text/javascript">
      var jsilConfig = {
        winForms: true,
        manifests: [
          "SimpleRaytracer.exe",
        ],

        scriptRoot: "",
        libraryRoot: "../Libraries/",
        fileRoot: "",
        contentRoot: "Content/"      
      };
    </script>
    <script src="../Libraries/JSIL.js" type="text/javascript"></script>  

    <a href="https://github.com/sq/JSIL/blob/master/Examples/SimpleRaytracer.cs">Source C#</a> | <a href="SimpleRaytracer, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.js">Compiled JS</a>
    <br><hr>
    <button id="loadButton">Load raytracer</button> <button id="runButton" style="display:none">Run raytracer again</button><br>
    
    <canvas id="canvas"></canvas><br>
    <span id="speed" style="font-family: Consolas, Courier New, Courier"></span><br>
    
    <div id="log" style="font-family: Consolas, Courier New, monospace"></div>
    
    <script type="text/javascript">      
      var assetsToLoad = [
      ];
            
      function runMain () {
        document.getElementById("runButton").style.display = "none";
        document.getElementById("log").innerHTML = "";
        JSIL.GetAssembly("SimpleRaytracer, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null").simpleray.RayTracer.Main([]);
        document.getElementById("runButton").style.display = "";
      };
    </script>

    <script type="text/javascript">
      document.getElementById("runButton").addEventListener(
        "click", runMain
      );
    </script>
  </body>
</html>